﻿using AutoMapper;
using RedDragon.Common.Domain;
using RedDragon.Common.Domain.AuthorizeRBAC;
using RedDragon.RBAC.API.Application.Common.Client;
using RedDragon.RBAC.API.Application.Common.Permission;
using RedDragon.RBAC.API.Application.Common.Resourec;
using RedDragon.RBAC.API.Application.Common.Role;
using RedDragon.RBAC.API.Application.Common.Sale;
using RedDragon.RBAC.API.Application.Common.Storehouse;
using RedDragon.RBAC.API.Application.Common.User;
using RedDragon.RBAC.API.Application.Common.UserRolePermission;
namespace RearLivestock.RBAC.Api.Common
{
    /// <summary>
    /// 配置AutoMapper映射
    /// </summary>
    public class AutoMapperProfile : Profile
    {
        /// <summary>
        /// AutoMapperProfile
        /// </summary>
        public AutoMapperProfile()
        {
            //权限添加
            CreateMap<CreatePermissionsCommand, Permissions>();
            //角色添加
            CreateMap<CreateRolesCommand, Roles>();
            //用户注册
            CreateMap<AddUsersCommand, Users>();
            //用户登录
            CreateMap<AddLoginCommand, Users>();
            //用户角色添加
            CreateMap<AddUserRoleCommand, UserRoles>();
            //角色权限添加
            CreateMap<CreateRolePermissionCommand, RolePermissions>();
            //资源管理添加
            CreateMap<AddResourecCommand, Resource>();
            //资源管理显示
            CreateMap<ShowResourCommand, Resource>();
            //客户管理添加
            CreateMap<AddClientsCommand, Clients>();
            //客户管理显示
            CreateMap<QueryClientComand, Clients>();
            //权限修改
            CreateMap<UpdatePermissionsCommand, Permissions>();
            //客户反填
            CreateMap<FanClientCommand, Clients>();
            //客户修改
            CreateMap<UpdateClientCommand, Clients>();
            //订单管理添加
            CreateMap<AddSaleCommand, Sales>();
            //订单管理添加
            CreateMap<ShowSaleCommand, Sales>();
            //客户反填
            CreateMap<FindSaleCommand, Sales>();
            //订单管理修改
            CreateMap<UpdateSaleCommand, Sales>();
            //入库添加
            CreateMap<AddstorehouseCommand, Storehouses>();
            //入库列表
            CreateMap<ShowStorehouseCommand, Storehouses>();
            //入库删除
            CreateMap<DeletetorehouseCommand, Storehouses>();
            //入库回显
            CreateMap<FindStorehouseCommand, Storehouses>();
            //入库修改
            CreateMap<UpdateStorehouseCommand, Storehouses>();

        }
    }
}
